#ifndef _FIG_CONVERSATION_H_
#define _FIG_CONVERSATION_H_


#include "math/vec2.h"
#include <vector>
#include <string>

namespace ui
{
	class UIWidget;
}


class FIGConversation
{
public:

	const static float				SPEECH_DURATION;

	 enum SPEECH_TYPES
	 {
		SPEECH_ENEMY_BOSS,
		SPEECH_PLAYER_1,
		SPEECH_PLAYER_2,
		SPEECH_TYPE_COUNT,

	 };

	 struct	CONVO_SPEECH
	 {
		SPEECH_TYPES				m_Type;
		std::string					m_String;
		float						m_Delay;
		float						m_Counter;

		CONVO_SPEECH() : m_Type(SPEECH_PLAYER_1),
						 m_Delay(0),
						 m_Counter(0)
		{

		}
						

	 };

	static FIGConversation&			Instance();

	
	void							StartConvoLevel( float& ConvoDuration);
	void							StartConvoBossFight( float& ConvoDuration);		

	void							PushTalk(	SPEECH_TYPES Type,
												const std::string& Speech
												);


	void							Tick(float dt);
	void							Clear();
	void							UpdateBossPos(const math::Vec2& Pos) { m_BossPos  = Pos; };
	void							UpdatePlayerPos(const math::Vec2& Pos){ m_PlayerPos= Pos; };

	

	
	
protected:

	

	

	void							Conversatoin_1();
	void							Conversatoin_2();
	void							Conversatoin_3();
	void							Conversatoin_4();
	void							Conversatoin_5();
	void							Conversatoin_6();
	void							Conversatoin_7();

	void							Convo_BossFight_1();
	void							Convo_BossFight_2();
	void							Convo_BossFight_3();
	void							Convo_BossFight_4();
	void							Convo_BossFight_5();
	void							Convo_BossFight_6();
	void							Convo_BossFight_7();


private:

	FIGConversation();

	std::vector<CONVO_SPEECH*>		m_Conversations;  


	ui::UIWidget*					m_pUITalkBoxPlayer;
	ui::UIWidget*					m_pUITalkBoxBoss;
	ui::UIWidget*					m_pUIPlayerName;
	ui::UIWidget*					m_pUITalkTextPlayer;

	ui::UIWidget*					m_pUITalkTextBoss;

	float							m_Delay;

	math::Vec2						m_PlayerPos;
	math::Vec2						m_BossPos;

};


#endif //_FIG_CONVERSATION_H_